//
//  CityButton.m
//  diaoyuren
//
//  Created by 钓鱼人 on 16/1/31.
//  Copyright © 2016年 game. All rights reserved.
//

#import "CityButton.h"
#import "Masonry.h"
@interface CityButton ()

@property (nonatomic,strong) UIImageView *Img;

@end

@implementation CityButton


-(instancetype)init{
    if (self = [super init]) {
        
        
    }
    return self;
}

-(UILabel *)text{

    if (!_text) {
        _text = [UILabel new];
        _text.textColor = [UIColor whiteColor];
        _text.font = font(SCREEN_WIDTH*0.048);
//        _text.backgroundColor = RGBAS;
        
        [self addSubview:_text];
        
        [_text mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.left.equalTo(self);
            
        }];
        self.Img.image = [UIImage imageNamed:@"Investment list_Choose"];
    }
    
    return _text;
}

-(UIImageView *)Img{
    if (!_Img) {
        _Img = [UIImageView new];
      
        [self addSubview:_Img];
    
        [_Img mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(_text.mas_right).offset(2);
            make.right.equalTo(self);
            make.centerY.equalTo(self.mas_centerY).offset(2);
        }];
    }
    return _Img;
}
@end
